//
//  Card_PlayerSelected.h
//  Card
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"

typedef enum
{
	CARD_PLAYER_ARROW_LEFT  = 0x0100,
	CARD_PLAYER_ARROW_RIGHT,
}Card_PlayerSelected_Tag;

typedef enum 
{
	ECard_PlayerSelected_Play,//开始游戏
	ECard_PlayerSelected_Return,
	ECard_PlayerSelected_Des,
	ECard_PlayerSelected_Count
}ECard_PlayerSelected;

@protocol Card_PlayerSelectedDelegate

- (void)Card_PlayerSelected:(NSInteger)pIndex PlayerNum:(NSInteger)pPlayerNum;

@end

@interface Card_PlayerSelected : CCLayer<ReplaceLayerActionDelegate,UITextFieldDelegate>
{
	id<Card_PlayerSelectedDelegate> delegate;
	
	CCLabelTTF *labelPlayer;
	
	//CCMenuItem *startMenu;
	
	//CCMenuItem * rightArrow;
	//CCMenuItem * leftArrow;
	
	//UITextField *pTextField;
	NSMutableArray *playerInfoArray;
}

+(CCScene *) scene;

-(id)init:(id<Card_PlayerSelectedDelegate>) _delegate;

//设置玩家人数
-(void)setPlayerNum:(id)sender;
-(void)OnStartCardGame:(id)sender;

//保存玩家信息
-(void)savePlayerInfo;

//显示供用户输入的UITextField
-(void)showTextFieldWithIndex:(int)index;
-(void)showTextField;

@end
